import numpy as np
# 创建矩阵
arr1 = np.arange(1,9).reshape(2,4)
print(arr1)
"""
[[1 2 3 4]
 [5 6 7 8]]
"""
# 加法
print(arr1 + 10)
"""
[[11 12 13 14]
 [15 16 17 18]]
"""
# 减法
print(arr1 - 10)
"""
[[-9 -8 -7 -6]
 [-5 -4 -3 -2]]
"""
# 乘法
print(arr1 * 10)
"""
[[10 20 30 40]
 [50 60 70 80]]
"""
# 除法
print(arr1 / 10)
"""
[[0.1 0.2 0.3 0.4]
 [0.5 0.6 0.7 0.8]]
"""
# 平方
print(arr1 ** 2)
"""
[[ 1  4  9 16]
 [25 36 49 64]]
"""
# 取整
print(arr1 // 6)
"""
[[0 0 0 0]
 [0 1 1 1]]
"""
# 取余
print(arr1 % 6)
"""
[[1 2 3 4]
 [5 0 1 2]]
"""